import java.util.Scanner;

public class Test {
    public static void Bubble_Sort(int[] array){
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < array.length -1 -i; j++) {
                if(array[j]>array[j+1]){
                    int temp = array[j];
                    array[j] = array[j+1];
                    array[j+1] = temp;
                }
            }
        }
        for (int i = 0; i < array.length; i++) {
            System.out.printf("%d ",array[i]);
        }
    }
    public static void main(String[] args) {
        int[] array = {1,23,5345,45,5,4365,7,657,8,89999};
        Bubble_Sort(array);
    }
}
